home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
reswtch2
/
rwabout.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-04-08
|
3KB
|
113 lines
{ This is my Custom About Box designed specifically for TechnoSoft }
unit Rwabout;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Rzlabel;
type
TRWAboutBox = class(TForm)
Panel1: TPanel;
ProgramIcon: TImage;
Panel2: TPanel;
Label8: TLabel;
Label10: TLabel;
UserName: TLabel;
CompanyName: TLabel;
Panel3: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
WinVersion: TLabel;
DosVersion: TLabel;
Coprocessor: TLabel;
CPU: TLabel;
Panel4: TPanel;
Label5: TLabel;
Label6: TLabel;
Label9: TLabel;
FreeMemory: TLabel;
FreeResources: TLabel;
FreeDisk: TLabel;
Panel5: TPanel;
Panel6: TPanel;
BitBtn1: TBitBtn;
Version: TRzLabel;
VersionNumber: TRzLabel;
Copyright: TRzLabel;
ProductName: TRzLabel;
Comments: TRzLabel;
procedure Button1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
fileHandle: THandle;
fileBuffer: Array [0..29] of Char;
wVersion: Word;
dVersion: Word;
winFlags: LongInt;
public
{ Public declarations }
end;
var
RWAboutBox: TRWAboutBox;
implementation
{$R *.DFM}
procedure TRWAboutBox.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TRWAboutBox.FormActivate(Sender: TObject);
begin
{ Get Win/Dos version numbers }
wVersion := LoWord(GetVersion);
dVersion := HiWord(GetVersion);
WinVersion.Caption := IntToStr(LO(wVersion)) + '.' +
IntToStr(HI(wVersion));
DosVersion.Caption := IntToStr(HI(dVersion)) + '.' +
IntToStr(LO(dVersion));
winFlags := GetWinFlags;
{ Get math coprocessor status }
if winFlags and WF_80x87 > 0 then
Coprocessor.Caption := 'Present'
else
Coprocessor.Caption := 'Not Present';
{ Get CPU type }
if winFlags and WF_CPU486 > 0 then
CPU.Caption := '486 or Pentium';
if winFlags and WF_CPU386 > 0 then
CPU.Caption := '386';
if winFlags and WF_CPU286 > 0 then
CPU.Caption := '286';
{ Get free memory, resources, disk space }
FreeMemory.Caption := IntToStr(GetFreeSpace(0) div 1000) + ' KB';
FreeResources.Caption := IntToStr(GetFreeSystemResources(GFSR_SYSTEMRESOURCES))
+ '%';
FreeDisk.Caption := IntToStr(DiskFree(3) div 1000000) + ' MB';
{ Get user name and company name }
fileHandle := LoadLibrary('USER');
if fileHandle >= HINSTANCE_ERROR then begin
if LoadString(fileHandle, 514, @fileBuffer, 30) <> 0 then
UserName.Caption := fileBuffer;
if LoadString(fileHandle, 515, @fileBuffer, 30) <> 0 then
CompanyName.Caption := fileBuffer;
FreeLibrary(fileHandle);
end;
end;
end.